package com.bsoft.gol.hcs.clinical.entity;

import javax.persistence.*;
import java.math.BigDecimal;

@Entity
@Table(name = "ods_prescription_apply_drug",  catalog = "")
public class OdsPrescriptionApplyDrug {
    private String applyDrugId;
    private String prescriptionApplyId;
    private String orgDrugId;
    private String orgDrugName;
    private String orgFactoryId;
    private String orgFactoryName;
    private String drugName;
    private String drugType;
    private String specification;
    private String dosageFormCode;
    private String dosageFormName;
    private Double dose;
    private String doseUnit;
    private String frequencyCode;
    private String frequencyName;
    private String usageCode;
    private String usageName;
    private String decoctionCode;
    private String decoctionName;
    private BigDecimal quantity;
    private String useFlag;
    private String packUnit;
    private BigDecimal price;
    private Integer takeDays;
    private Integer groupNumber;
    private Integer sortNumber;
    private String remark;
    private String footNoteCode;
    private String footNoteName;

    @Id
    @Column(name = "apply_drug_id")
    public String getApplyDrugId() {
        return applyDrugId;
    }

    public void setApplyDrugId(String applyDrugId) {
        this.applyDrugId = applyDrugId;
    }

    @Basic
    @Column(name = "prescription_apply_id")
    public String getPrescriptionApplyId() {
        return prescriptionApplyId;
    }

    public void setPrescriptionApplyId(String prescriptionApplyId) {
        this.prescriptionApplyId = prescriptionApplyId;
    }

    @Basic
    @Column(name = "org_drug_id")
    public String getOrgDrugId() {
        return orgDrugId;
    }

    public void setOrgDrugId(String orgDrugId) {
        this.orgDrugId = orgDrugId;
    }

    @Basic
    @Column(name = "org_drug_name")
    public String getOrgDrugName() {
        return orgDrugName;
    }

    public void setOrgDrugName(String orgDrugName) {
        this.orgDrugName = orgDrugName;
    }

    @Basic
    @Column(name = "org_factory_id")
    public String getOrgFactoryId() {
        return orgFactoryId;
    }

    public void setOrgFactoryId(String orgFactoryId) {
        this.orgFactoryId = orgFactoryId;
    }

    @Basic
    @Column(name = "org_factory_name")
    public String getOrgFactoryName() {
        return orgFactoryName;
    }

    public void setOrgFactoryName(String orgFactoryName) {
        this.orgFactoryName = orgFactoryName;
    }

    @Basic
    @Column(name = "drug_name")
    public String getDrugName() {
        return drugName;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    @Basic
    @Column(name = "drug_type")
    public String getDrugType() {
        return drugType;
    }

    public void setDrugType(String drugType) {
        this.drugType = drugType;
    }

    @Basic
    @Column(name = "specification")
    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    @Basic
    @Column(name = "dosage_form_code")
    public String getDosageFormCode() {
        return dosageFormCode;
    }

    public void setDosageFormCode(String dosageFormCode) {
        this.dosageFormCode = dosageFormCode;
    }

    @Basic
    @Column(name = "dosage_form_name")
    public String getDosageFormName() {
        return dosageFormName;
    }

    public void setDosageFormName(String dosageFormName) {
        this.dosageFormName = dosageFormName;
    }

    @Basic
    @Column(name = "dose")
    public Double getDose() {
        return dose;
    }

    public void setDose(Double dose) {
        this.dose = dose;
    }

    @Basic
    @Column(name = "dose_unit")
    public String getDoseUnit() {
        return doseUnit;
    }

    public void setDoseUnit(String doseUnit) {
        this.doseUnit = doseUnit;
    }

    @Basic
    @Column(name = "frequency_code")
    public String getFrequencyCode() {
        return frequencyCode;
    }

    public void setFrequencyCode(String frequencyCode) {
        this.frequencyCode = frequencyCode;
    }

    @Basic
    @Column(name = "frequency_name")
    public String getFrequencyName() {
        return frequencyName;
    }

    public void setFrequencyName(String frequencyName) {
        this.frequencyName = frequencyName;
    }

    @Basic
    @Column(name = "usage_code")
    public String getUsageCode() {
        return usageCode;
    }

    public void setUsageCode(String usageCode) {
        this.usageCode = usageCode;
    }

    @Basic
    @Column(name = "usage_name")
    public String getUsageName() {
        return usageName;
    }

    public void setUsageName(String usageName) {
        this.usageName = usageName;
    }

    @Basic
    @Column(name = "decoction_code")
    public String getDecoctionCode() {
        return decoctionCode;
    }

    public void setDecoctionCode(String decoctionCode) {
        this.decoctionCode = decoctionCode;
    }

    @Basic
    @Column(name = "decoction_name")
    public String getDecoctionName() {
        return decoctionName;
    }

    public void setDecoctionName(String decoctionName) {
        this.decoctionName = decoctionName;
    }

    @Basic
    @Column(name = "quantity")
    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    @Basic
    @Column(name = "use_flag")
    public String getUseFlag() {
        return useFlag;
    }

    public void setUseFlag(String useFlag) {
        this.useFlag = useFlag;
    }

    @Basic
    @Column(name = "pack_unit")
    public String getPackUnit() {
        return packUnit;
    }

    public void setPackUnit(String packUnit) {
        this.packUnit = packUnit;
    }

    @Basic
    @Column(name = "price")
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Basic
    @Column(name = "take_days")
    public Integer getTakeDays() {
        return takeDays;
    }

    public void setTakeDays(Integer takeDays) {
        this.takeDays = takeDays;
    }

    @Basic
    @Column(name = "group_number")
    public Integer getGroupNumber() {
        return groupNumber;
    }

    public void setGroupNumber(Integer groupNumber) {
        this.groupNumber = groupNumber;
    }

    @Basic
    @Column(name = "sort_number")
    public Integer getSortNumber() {
        return sortNumber;
    }

    public void setSortNumber(Integer sortNumber) {
        this.sortNumber = sortNumber;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "foot_note_code")
    public String getFootNoteCode() {
        return footNoteCode;
    }

    public void setFootNoteCode(String footNoteCode) {
        this.footNoteCode = footNoteCode;
    }

    @Basic
    @Column(name = "foot_note_name")
    public String getFootNoteName() {
        return footNoteName;
    }

    public void setFootNoteName(String footNoteName) {
        this.footNoteName = footNoteName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        OdsPrescriptionApplyDrug that = (OdsPrescriptionApplyDrug) o;

        if (applyDrugId != null ? !applyDrugId.equals(that.applyDrugId) : that.applyDrugId != null) {
            return false;
        }
        if (prescriptionApplyId != null ? !prescriptionApplyId.equals(that.prescriptionApplyId) : that.prescriptionApplyId != null) {
            return false;
        }
        if (orgDrugId != null ? !orgDrugId.equals(that.orgDrugId) : that.orgDrugId != null) {
            return false;
        }
        if (orgDrugName != null ? !orgDrugName.equals(that.orgDrugName) : that.orgDrugName != null) {
            return false;
        }
        if (orgFactoryId != null ? !orgFactoryId.equals(that.orgFactoryId) : that.orgFactoryId != null) {
            return false;
        }
        if (orgFactoryName != null ? !orgFactoryName.equals(that.orgFactoryName) : that.orgFactoryName != null) {
            return false;
        }
        if (drugName != null ? !drugName.equals(that.drugName) : that.drugName != null) {
            return false;
        }
        if (drugType != null ? !drugType.equals(that.drugType) : that.drugType != null) {
            return false;
        }
        if (specification != null ? !specification.equals(that.specification) : that.specification != null) {
            return false;
        }
        if (dosageFormCode != null ? !dosageFormCode.equals(that.dosageFormCode) : that.dosageFormCode != null) {
            return false;
        }
        if (dosageFormName != null ? !dosageFormName.equals(that.dosageFormName) : that.dosageFormName != null) {
            return false;
        }
        if (dose != null ? !dose.equals(that.dose) : that.dose != null) {
            return false;
        }
        if (doseUnit != null ? !doseUnit.equals(that.doseUnit) : that.doseUnit != null) {
            return false;
        }
        if (frequencyCode != null ? !frequencyCode.equals(that.frequencyCode) : that.frequencyCode != null) {
            return false;
        }
        if (frequencyName != null ? !frequencyName.equals(that.frequencyName) : that.frequencyName != null) {
            return false;
        }
        if (usageCode != null ? !usageCode.equals(that.usageCode) : that.usageCode != null) {
            return false;
        }
        if (usageName != null ? !usageName.equals(that.usageName) : that.usageName != null) {
            return false;
        }
        if (decoctionCode != null ? !decoctionCode.equals(that.decoctionCode) : that.decoctionCode != null) {
            return false;
        }
        if (decoctionName != null ? !decoctionName.equals(that.decoctionName) : that.decoctionName != null) {
            return false;
        }
        if (quantity != null ? !quantity.equals(that.quantity) : that.quantity != null) {
            return false;
        }
        if (useFlag != null ? !useFlag.equals(that.useFlag) : that.useFlag != null) {
            return false;
        }
        if (packUnit != null ? !packUnit.equals(that.packUnit) : that.packUnit != null) {
            return false;
        }
        if (price != null ? !price.equals(that.price) : that.price != null) {
            return false;
        }
        if (takeDays != null ? !takeDays.equals(that.takeDays) : that.takeDays != null) {
            return false;
        }
        if (groupNumber != null ? !groupNumber.equals(that.groupNumber) : that.groupNumber != null) {
            return false;
        }
        if (sortNumber != null ? !sortNumber.equals(that.sortNumber) : that.sortNumber != null) {
            return false;
        }
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) {
            return false;
        }
        if (footNoteCode != null ? !footNoteCode.equals(that.footNoteCode) : that.footNoteCode != null) {
            return false;
        }
        if (footNoteName != null ? !footNoteName.equals(that.footNoteName) : that.footNoteName != null) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = applyDrugId != null ? applyDrugId.hashCode() : 0;
        result = 31 * result + (prescriptionApplyId != null ? prescriptionApplyId.hashCode() : 0);
        result = 31 * result + (orgDrugId != null ? orgDrugId.hashCode() : 0);
        result = 31 * result + (orgDrugName != null ? orgDrugName.hashCode() : 0);
        result = 31 * result + (orgFactoryId != null ? orgFactoryId.hashCode() : 0);
        result = 31 * result + (orgFactoryName != null ? orgFactoryName.hashCode() : 0);
        result = 31 * result + (drugName != null ? drugName.hashCode() : 0);
        result = 31 * result + (drugType != null ? drugType.hashCode() : 0);
        result = 31 * result + (specification != null ? specification.hashCode() : 0);
        result = 31 * result + (dosageFormCode != null ? dosageFormCode.hashCode() : 0);
        result = 31 * result + (dosageFormName != null ? dosageFormName.hashCode() : 0);
        result = 31 * result + (dose != null ? dose.hashCode() : 0);
        result = 31 * result + (doseUnit != null ? doseUnit.hashCode() : 0);
        result = 31 * result + (frequencyCode != null ? frequencyCode.hashCode() : 0);
        result = 31 * result + (frequencyName != null ? frequencyName.hashCode() : 0);
        result = 31 * result + (usageCode != null ? usageCode.hashCode() : 0);
        result = 31 * result + (usageName != null ? usageName.hashCode() : 0);
        result = 31 * result + (decoctionCode != null ? decoctionCode.hashCode() : 0);
        result = 31 * result + (decoctionName != null ? decoctionName.hashCode() : 0);
        result = 31 * result + (quantity != null ? quantity.hashCode() : 0);
        result = 31 * result + (useFlag != null ? useFlag.hashCode() : 0);
        result = 31 * result + (packUnit != null ? packUnit.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (takeDays != null ? takeDays.hashCode() : 0);
        result = 31 * result + (groupNumber != null ? groupNumber.hashCode() : 0);
        result = 31 * result + (sortNumber != null ? sortNumber.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (footNoteCode != null ? footNoteCode.hashCode() : 0);
        result = 31 * result + (footNoteName != null ? footNoteName.hashCode() : 0);
        return result;
    }
}
